package service;

import dao.IndexDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pojo.Comment;
import pojo.Products;

import java.util.List;

@Service("indexService")
@Transactional
public class IndexService {
    @Autowired
    private IndexDao indexDao;
    public List<Comment> sAC(){return indexDao.selectAllComment();}
    public List<Products> sAP(){return indexDao.selectAllProduct();}
    public List<Products> sOP(Integer pid){return indexDao.selectOneProduct(pid);}
}
